home *** CD-ROM | disk | FTP | other *** search
- Path: news.genie.net!usenet
- From: i.einman@genie.com (IAN J. EINMAN)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: How to patch workbench to show fakeicons??
- Date: 7 Feb 1996 07:14:22 GMT
- Organization: via GEnie Services (1-800-638-9636 or info@genie.com)
- Sender: i.einman@genie.com (IAN J. EINMAN)
- Message-ID: <4f9jge$ll6@rock101.genie.net>
- NNTP-Posting-Host: rock103.is.ge.com
-
- >>I'm trying to patch Workbench to make it show fakeicons instead of normal
- deficons (like iconchief and deficons do). I've tried to patch the
- GetDiskObject function, hoping the workbench uses it, but no result. I think
- the workbench uses some private function (maybe in icon.library). Can someone
- help me? Thank you!!!
-
- Sure can. You need to patch GetIcon and PutIcon.
-
- GetIcon: offset -42
- proto: GetIcon(char *name, struct DiskObject *icon, struct FreeList *fl)
- a0 a1 a2
-
- PutIcon: offset -48
- proto: PutIcon(char *name, struct DiskObject *icon)
- a0 a1
-
- These functions are PRIVATE now, but are documented in old intuition manuals.
- I've done this before, so I have examples but they are in assembly and not
- very easy to read at that.
-
- Basically when you patch in there, you want to stick yourself right after the
- Workbench calls GetIcon. It has allocated a DO and FL structure already.
- You lock the name +.info to see if it is there. If not, substitute your
- icon for "name". It is a piece of CAKE.
-
-